/**
 * Created by MDURAND on 26/11/2014.
 *
 * Objet domain SerieModel
 */
helloseriesApp.factory('SerieModel', function (){
    var SerieModel = function (data){

        angular.extend(this, {
            ajout: true,
            nom: "",
            episode: "",
            saison: "",
            version: "VOSTFR",
            qualite: "_720P",

             // Function
            prettyPrint : function(){
                return this.nom+"S"+(this.saison > 9)? this.saison:"0"+saison +"E"+ (this.episode > 9)? this.episode:"0"+episode;
            }
        }, data);


    };

    // Fonctions du model
    // Valeurs métiers
    SerieModel.getQualites = function () {
        return [
            {libelle: '1080p', code: '_1080P'},
            {libelle: '720p', code: '_720P'},
            {libelle: 'SD', code: 'SD'}
        ];
    };

    SerieModel.getVersions = function () {
        return [
            {libelle: 'VOSTFR', code: 'VOSTFR'},
            {libelle: 'VF', code: 'VF'},
            {libelle: 'VO', code: 'VO'}
        ];
    };

    return SerieModel;

});